@extends('layouts.admin_modal')

@section('content')
    <div class="box-body">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#basic" data-toggle="tab" aria-expanded="true">基础</a></li>
                <li class=""><a href="#extend" data-toggle="tab" aria-expanded="false">扩展</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="basic">
                    <div class="form-group">
                        <label for="input-title" class="col-sm-2 control-label">栏目名称</label>

                        <div class="col-sm-10">
                            {!! get_input_html('info[title]', get_value($detail, 'title', ''), ['id'=>'input-title']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-pid" class="col-sm-2 control-label">所属栏目</label>

                        <div class="col-sm-10">
                            <select name="info[pid]" id="input-pid" class="form-control">
                                {!! get_select_tree($categoryList) !!}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-title_en" class="col-sm-2 control-label">栏目英文名称</label>

                        <div class="col-sm-10">
                            {!! get_input_html('info[title_en]', get_value($detail, 'title_en', ''), ['id'=>'input-title_en']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-page_limit" class="col-sm-2 control-label">每页条数</label>

                        <div class="col-sm-10">
                            {!! get_input_html('info[page_limit]', get_value($detail, 'page_limit', ''), ['id'=>'input-page_limit', 'type'=>'number']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-document_type" class="col-sm-2 control-label">栏目文档类型</label>
                        <div class="col-sm-10">
                            {!! get_radio_html(config('admin.systems.category_document_type'), 'info[document_type]', get_value($detail, 'document_type', 0), ['id'=>'input-document_type']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-is_page" class="col-sm-2 control-label">是否单网页</label>
                        <div class="col-sm-10">
                            {!! get_radio_html(config('admin.systems.category_is_page'), 'info[is_page]', get_value($detail, 'is_page', 0), ['id'=>'input-title']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-is_disabled" class="col-sm-2 control-label">是否禁用</label>
                        <div class="col-sm-10">
                            {!! get_radio_html(config('admin.systems.category_is_disabled'), 'info[is_disabled]', get_value($detail, 'is_disabled', 0), ['id'=>'input-is_disabled']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-description" class="col-sm-2 control-label">栏目简介</label>

                        <div class="col-sm-10">
                            {!! get_textarea_html('info[description]', get_value($detail, 'description', ''), ['id'=>'input-description']) !!}
                        </div>
                    </div>
                </div>

                <div class="tab-pane" id="extend">
                    <div class="form-group">
                        <label for="input-cover" class="col-sm-2 control-label">封面图片</label>

                        <div class="col-sm-10">
                            {!! get_upload_picture_html('info[cover]', ['id'=>0, 'url'=>get_value($detail, 'cover', ''), 'desc'=>''], 1) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-seo_title" class="col-sm-2 control-label">SEO标题</label>

                        <div class="col-sm-10">
                            {!! get_input_html('info[seo_title]', get_value($detail, 'seo_title', ''), ['id'=>'input-seo_title']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-seo_keywords" class="col-sm-2 control-label">SEO关键字</label>

                        <div class="col-sm-10">
                            {!! get_input_html('info[seo_keywords]', get_value($detail, 'seo_keywords', ''), ['id'=>'input-seo_keywords']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-seo_description" class="col-sm-2 control-label">SEO描述</label>

                        <div class="col-sm-10">
                            {!! get_textarea_html('info[seo_description]', get_value($detail, 'seo_description', ''), ['id'=>'input-seo_description']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-template_index" class="col-sm-2 control-label">前台栏目主题模板</label>

                        <div class="col-sm-10">
                            {!! get_select_html(config('admin.systems.category_template_index_list'), 'info[template_index]', get_value($detail, 'template_index', ''), ['id'=>'input-template_index']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-template_list" class="col-sm-2 control-label">前台栏目列表模板</label>

                        <div class="col-sm-10">
                            {!! get_select_html(config('admin.systems.category_template_list_list'), 'info[template_list]', get_value($detail, 'template_list', ''), ['id'=>'input-template_list']) !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-template_index" class="col-sm-2 control-label">前台栏目详情模板</label>

                        <div class="col-sm-10">
                            {!! get_select_html(config('admin.systems.category_template_detail_list'), 'info[template_detail]', get_value($detail, 'template_detail', ''), ['id'=>'input-template_detail']) !!}
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <input type="hidden" name="info[id]" value="{{ get_value($detail, 'id') }}">
@endsection